const db = require('./db/db');
//导入BookModel
const BookModel = require('./models/BookModel');
//调用函数,把实参传递给形参
db(()=>{
    //个性化读取
    BookModel.find().select({name:1,author:1,_id:0}).then((data)=>{
        console.log('个性化读取成功',data);//个性化读取成功
    }).catch((res)=>{
        console.log('个性化读取失败',res)//个性化读取失败
    })
},()=>{
    console.log('连接失败')
});

